//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.Research.ScientificWorkflow.TridentModel
{
    /// <summary>
    /// The category attribute is applicable to workflow activities.
    /// It defines which category to associate a particular workflow
    /// item with. Activities may have more than one category. The
    /// categories themselves are defined using a string path through
    /// the category heirarchy. This path uses the ID of the categories
    /// to identify a category.
    /// 
    /// For example:
    /// 
    /// [Category("Data/Xml")]
    /// [Category("Data/Streams"]
    /// public class XmlDocumentReader : Activity ...
    /// 
    /// If the category is not found in the know category tree it will be
    /// assigned to an uncategorized group.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class WorkflowCategoryAttribute : Attribute
    {
        private string path;

        /// <summary>
        /// Defines a category on a workflow item by passing in a path
        /// representing a place in the tree of known categories.
        /// </summary>
        /// <param name="path"></param>
        public WorkflowCategoryAttribute(string path)
        {
            this.path = path;
        }

        public string Path
        {
            get { return path; }
        }
    }
}
